package com.leoman.plz_p.module.api;


import com.leoman.plz_p.constants.Urls;
import com.leoman.plz_p.module.bean.BannerBean;
import com.leoman.plz_p.module.bean.BaseData;
import com.leoman.plz_p.module.bean.CategoryBean;
import com.leoman.plz_p.module.bean.CourseBean;
import com.leoman.plz_p.module.bean.MapData;
import com.leoman.plz_p.module.bean.PageListData;

import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by guoh on 2018/7/15.
 */
public interface MainApi {

    @POST(Urls.GET_COURSE_LIST)
    Observable<BaseData<PageListData<CourseBean>>> getCourseList(@Query("name") String name, @Query("page") int page, @Query("size") int size);

    @POST(Urls.GO_RECENT_STUDY)
    Observable<BaseData<MapData>> getRecentStudy(@Query("token") String token);

    @POST(Urls.GET_ABOUT_US)
    Observable<BaseData<MapData>> getAboutUs();

    @POST(Urls.HELP_CENTER)
    Observable<BaseData<MapData>> getHelp();

    @POST(Urls.SHOW_CATEGORY)
    Observable<BaseData<PageListData<CategoryBean>>> getCategory(@Query("page")int page, @Query("size")int size);

    @POST(Urls.GET_FINE_COURSE)
    Observable<BaseData<PageListData<CourseBean>>> getFineCourse(@Query("page")int page,@Query("size")int size,@Query("name")String name);


    @POST(Urls.GET_HOT_COURSE)
    Observable<BaseData<PageListData<CourseBean>>> getHotCourse(@Query("page")int page,@Query("size")int size,@Query("name")String name);

    @POST(Urls.SHOW_CLASS_BY_CATEGORY)
    Observable<BaseData<PageListData<CourseBean>>> getCourseByCategory(@Query("page")int page,@Query("size")int size,@Query("categoryId")String categoryId,@Query("name")String name);


    @POST(Urls.GET_BANNER)
    Observable<BaseData<MapData<BannerBean>>> getBanner();


}
